home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- BorderStyle = 1 'Fixed Single
- Caption = "CD Player"
- ClientHeight = 435
- ClientLeft = 12780
- ClientTop = 10860
- ClientWidth = 2310
- Height = 840
- Icon = CDPLAYER.FRX:0000
- Left = 12720
- LinkTopic = "Form1"
- MaxButton = 0 'False
- ScaleHeight = 435
- ScaleWidth = 2310
- Top = 10515
- Width = 2430
- Begin Timer TIMERControl
- Enabled = 0 'False
- Interval = 500
- Left = 900
- Top = 570
- End
- Begin PictureBox MCIControl
- BackColor = &H000000FF&
- Height = 1000
- Left = 0
- ScaleHeight = 975
- ScaleWidth = 975
- TabIndex = 0
- Top = 0
- Width = 1000
- End
- 'This little utility was developed to enjoy your favourite
- 'comact discs while working hard in your office.
- '1994 Andre Rippstein, Niederglatt, Switzerland
- Sub Form_Load ()
- Dim lintLeft As Integer
- Dim lintTop As Integer
- lintLeft = (Screen.Width - Me.Width - 300) / Screen.TwipsPerPixelX
- lintTop = (Screen.Height - Me.Height - 300) / Screen.TwipsPerPixelY
- SetWindowPos Me.hWnd, HWND_TOPMOST, lintLeft, lintTop, 0, 0, SWP_NOSIZE
- MCIControl.Notify = False
- MCIControl.Wait = True
- TIMERControl.Enabled = True
- End Sub
- Sub Form_Resize ()
- If Me.WindowState = WS_MINIMIZED Then
- SetWindowPos Me.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, SWP_NOSIZE + SWP_NOMOVE
- Else
- SetWindowPos Me.hWnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOSIZE + SWP_NOMOVE
- End If
- End Sub
- Sub Form_Unload (Cancel As Integer)
- TIMERControl.Enabled = False
- MCIControl.Command = "Close"
- End Sub
- Sub MCIControl_EjectCompleted (ErrorCode As Long)
- MCIControl.Command = "Close"
- TIMERControl.Enabled = True
- End Sub
- Sub TIMERControl_Timer ()
- MCIControl.Command = "Open"
- If MCIControl.Error = 0 Then
- TIMERControl.Enabled = False
- End If
- End Sub
-